In [1]:
import numpy as np
In [2]:
from pygsf.mathematics.interpolations import interp_bilinear as s_bilinear_interp
In [3]:
s_bilinear_interp(
i=0,
j=0,
v00=42.0,
v01=17.2,
v10=-44.2,
v11=19.4)
Out[3]:
In [4]:
s_bilinear_interp(
i=0,
j=1,
v00=42.0,
v01=17.2,
v10=-44.2,
v11=19.4)
Out[4]:
In [5]:
s_bilinear_interp(
i=1,
j=0,
v00=42.0,
v01=17.2,
v10=-44.2,
v11=19.4)
Out[5]:
In [6]:
s_bilinear_interp(
i=1,
j=1,
v00=42.0,
v01=17.2,
v10=-44.2,
v11=19.4)
Out[6]:
In [7]:
s_bilinear_interp(
i=0,
j=0.5,
v00=10.0,
v01=30.0,
v10=-30,
v11=-10)
Out[7]:
In [8]:
s_bilinear_interp(
i=0.5,
j=0.0,
v00=10.0,
v01=20.2,
v10=-34.2,
v11=19.4)
Out[8]:
In [9]:
s_bilinear_interp(
i=0.5,
j=0.5,
v00=0.0,
v01=40.0,
v10=-30.0,
v11=-10.0)
Out[9]:
In [10]:
from pygsf.mathematics.arrays import interp_bilinear as a_bilinear_interp
In [11]:
arr = np.array([[0, 1],[1, 2]])
In [12]:
a_bilinear_interp(
arr=arr,
i=-1,
j=-1) is None
Out[12]:
In [13]:
a_bilinear_interp(
arr=arr,
i=2,
j=2) is None
Out[13]:
In [14]:
a_bilinear_interp(
arr=arr,
i=0.5,
j=1.5) is None
Out[14]:
In [15]:
a_bilinear_interp(
arr=arr,
i=0,
j=0)
Out[15]:
In [16]:
a_bilinear_interp(
arr=arr,
i=0,
j=1)
Out[16]:
In [17]:
a_bilinear_interp(
arr=arr,
i=1,
j=0)
Out[17]:
In [18]:
a_bilinear_interp(
arr=arr,
i=1,
j=1)
Out[18]:
In [19]:
a_bilinear_interp(
arr=arr,
i=0.5,
j=0)
Out[19]:
In [20]:
a_bilinear_interp(
arr=arr,
i=0.5,
j=1)
Out[20]:
In [21]:
a_bilinear_interp(
arr=arr,
i=0.75,
j=1)
Out[21]:
In [22]:
a_bilinear_interp(
arr=arr,
i=0.5,
j=0.5)
Out[22]:
In [23]:
a_bilinear_interp(
arr=arr,
i=1,
j=0.5)
Out[23]:
In [24]:
a_bilinear_interp(
arr=arr,
i=1,
j=0.75)
Out[24]:
In [ ]: